import Vue from 'vue';
import Router from 'vue-router';

import SignIn from '@/components/SignIn';
import SignUp from '@/components/SignUp';
import ResetPassword from '@/components/ResetPassword';
import ResetMobile from '@/components/ResetMobile';
import ResetEmail from '@/components/ResetEmail';
import Home from '@/components/Home';
import Security from '@/components/Security';
import Share from '@/components/Share';
import Up from '@/components/up';

Vue.use(Router);

export default new Router({
  routes: [{
    //登录
    path: '/',
    name: 'SignIn',
    component: SignIn
  }, {
    //注册
    path: '/sign-up',
    name: 'SignUp',
    component: SignUp
  }, {
    //重置绑定密码
    path: '/reset-p',
    name: 'ResetPassword',
    component: ResetPassword
  },{
    //重置绑定手机号
    path: '/reset-m',
    name: 'ResetMobile',
    component: ResetMobile,
    meta: {
      requireAuth: true
    }
  }, {
    //重置绑定邮箱
    path: '/reset-e',
    name: 'ResetEmail',
    component: ResetEmail,
    meta: {
      requireAuth: true
    }
  },{
    //主页
    path: '/home',
    name: 'Home',
    component: Home,
    meta: {
      requireAuth: true
    }
  }, {
    //系统安全
    path: '/setting-s',
    name: Security,
    component: Security,
    meta: {
      requireAuth: true
    }
  }, {
    //分享
    path: '/share',
    name: Share,
    component: Share
  }, {
    path: '/up',
    name: Up,
    component: Up
  }]
})
